package com.mrtan.mapper;

import com.mrtan.bean.Inandout;
import com.mrtan.dto.InandOutDto;
import com.mrtan.dto.InandOutInfo;
import com.mrtan.dto.InandOutInfoDto;
import com.mrtan.dto.YearDto;
import com.mrtan.vo.OutVO;
import com.mrtan.vo.OutWhereVO;
import com.mrtan.vo.StockInsertVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author Mr.Tan
 * @description 针对表【inandout(出入库)】的数据库操作Mapper
 * @createDate 2023-12-04 11:12:04
 * @Entity com.mrtan.bean.Inandout
 */
public interface InandoutMapper {

    int deleteByPrimaryKey(Integer id);

    int insert(Inandout record);

    int insertSelective(OutVO outVO);

    Inandout selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Inandout record);

    int updateByPrimaryKey(Inandout record);

    List<Inandout> selectAll();

    List<Inandout> selectout(OutWhereVO outWhereVO);

    int updateinandout(StockInsertVO stockInsertVO);

    void addInBound(@Param("order") Integer order,@Param("product") Integer product,@Param("quantity") Integer quantity,@Param("warehouse") Integer warehouse);

    List<Integer> selectAllyear();


    List<YearDto> selectfinanciali(@Param("year") int year);

    List<YearDto> selectfinancialo(@Param("year")int year);
    List<InandOutDto> findinandout(@Param("type")int type);

    List<InandOutInfoDto> findbyorderid(@Param("order") int order);

    InandOutInfo findinandoutInfo(@Param("type") int type);
    int insertInandOut(@Param("orderId") Integer orderId, @Param("warehouseId") Integer warehouseId, @Param("productId") Integer productId, @Param("quantity") int number);

}
